package com.jine.agent.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class WebController {

    @ResponseBody
    @RequestMapping(value = {"/"})
    public Object doThing(HttpServletRequest request, HttpServletResponse response) {
        String _uri= (String) request.getAttribute("_uri");
        System.out.println("WebController-doThing-URI:"+_uri);
        String result = "{\"uri\":\""+_uri+"\"}";
        return result;
    }
}
